/*
    @desc 判断数据是否为空
*/

function isEmpty (val) {
    let flag = false
    if( val  && val != null && val != '' && val != 'underfined') flag = true
    return flag
}

/*
    @desc 判断是否为空对象
*/

function isEmptyObject (obj) {
    let flag = false
    if(Object.prototype.toString.call(obj) === '[Object Object]') {
        if(JSON.stringify(obj) != "{}"){
            flag = true
        }
    }
    return flag
}

module.exports = {
    isEmpty,
    isEmptyObject
}
